STEP 1: Let's use a spinner and learn more about the lines of code that create it.

The spinner takes two arguments, theoretical probability and sample space. The list of theor_prob values determine the size of the sections that appear. The list, sample_space, holds all of the possible outcomes.

  • In SUBJECT, click on . Drag out Spinner.
  • Then, drag out Set Y, so we can change the spinner's position.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)